﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:custom="clr-namespace:SMF.HowTo.Player;assembly=SMF.HowTo.Player" 
    xmlns:p="clr-namespace:Microsoft.SilverlightMediaFramework.Player;assembly=Microsoft.SilverlightMediaFramework.Player" 
    xmlns:vms="clr-namespace:SMF.HowTo.UI.ViewModels" xmlns:SMF_HowTo_Shared_ValueConverters="clr-namespace:SMF.HowTo.Shared.ValueConverters;assembly=SMF.HowTo.Shared" x:Class="SMF.HowTo.UI.Views.PlayerView"
    >
	<UserControl.Resources>
		<SMF_HowTo_Shared_ValueConverters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
	</UserControl.Resources>
	<UserControl.Visibility>
		<Binding Converter="{StaticResource BooleanToVisibilityConverter}" Mode="OneWay" Path="IsVisible"/>
	</UserControl.Visibility>
    <UserControl.DataContext>
        <vms:PlayerViewModel/>
    </UserControl.DataContext>
    <Grid x:Name="LayoutRoot" Background="White">
        <custom:HowToPlayer  VolumeLevel="100"
            Videos="{Binding Videos}" 
            Markers="{Binding Markers}"
            SelectedMarker="{Binding SelectedMarker}">
            <p:CoreSmoothStreamingMediaElement AutoPlay="True"
                SmoothStreamingSource="{Binding SelectedVideo.Source}"
                />
        </custom:HowToPlayer>
    </Grid>
</UserControl>
